/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.cezary.butler.walili.client.mime;

import java.net.URLConnection;
import pl.cezary.butler.walili.client.db.tasks.NewDownloadTask;
import pl.cezary.butler.walili.server.db.Database;

/**
 *
 * @author Czarek
 */
public class QueueDowloadAction extends MimeTypeAction {
    
    
    private Database db;

    public QueueDowloadAction(Database db) {
        this.db = db;
    }    
    

    @Override
    public boolean process(URLConnection connection) {        
        db.executeDbTask(new NewDownloadTask(connection.getURL().toString()));              
        return true;
    }
    
}
